<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>键盘事件</title>
    <script src="vue.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>
    <div id="app">
        <input v-on:keyup.enter="submit">
        <input v-on:keyup.page-down="onPageDown">
        <input v-on:keyup.ctrl.enter="ctrlEnter">
        <div v-on:click.ctrl="ctrlEnter">Do something</div>
    </div>

    <script type="text/javascript">

        var app = new Vue({
            el: '#app',
            data: {
                message: 'Hello Vue'
            },
            methods: {
                submit() {
                    console.log('回车被按下');
                },
                onPageDown() {
                    console.log('onPageDown被按下');
                },
                ctrlEnter() {
                    console.log('组合键被按下');
                }
            }
        });
    </script>
</body>

</html>